class Member:
    def __init__(self, level):
        self._level = level

    @property
    def discount_rate(self):
        if self._level == "普通会员":
            return 0.95
        elif self._level == "高级会员":
            return 0.9
        elif self._level == "至尊会员":
            return 0.85
        else:
            return 1


class CartItem:
    def __init__(self, name, price, quantity, member):
        self.name = name
        self.price = price
        self.quantity = quantity
        self.member = member

    @property
    def total_price(self):
        return self.price * self.quantity * self.member.discount_rate


class ShoppingCart:
    def __init__(self):
        self.items = []

    def add_item(self, item):
        self.items.append(item)

    def apply_discount(self):
        total = 0
        for item in self.items:
            total += item.total_price
        return total

    def show(self):
        print("购物车商品信息：")
        for item in self.items:
            print(f"商品名称: {item.name}, 单价: {item.price}, 数量: {item.quantity}, "
                  f"会员等级: {item.member._level}, 折扣后总价: {item.total_price}")
        print(f"购物车折扣后总价: {self.apply_discount()}")

# 测试代码
if __name__ == "__main__":
    member1 = Member("高级会员")
    item1 = CartItem("苹果", 5, 3, member1)
    item2 = CartItem("香蕉", 3, 2, member1)

    cart = ShoppingCart()
    cart.add_item(item1)
    cart.add_item(item2)

    cart.show()